package cn.broadsense.biz.mapper;

import cn.broadsense.biz.bo.channel.ChannelOrgBo;
import cn.broadsense.biz.bo.channel.ChannelTagBo;
import cn.broadsense.biz.domain.Channel;
import cn.broadsense.biz.domain.CollectDataTask;
import cn.broadsense.biz.dto.ChannelOrgCountDto;
import cn.broadsense.biz.vo.ChannelGovernanceRuleCriteriaVo;
import cn.broadsense.biz.vo.ChannelGovernanceVo;
import cn.broadsense.biz.vo.SearchChannelVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author pengxin
* @description 针对表【t_channel(点位表 )】的数据库操作Mapper
* @createDate 2023-09-12 10:55:35
* @Entity cn.broadsense.biz.domain.Channel
*/
public interface ChannelMapper extends BaseMapper<Channel> {

    /**
     * 查询列表
     *
     * @param channel
     * @return
     */
    List<Channel> findList( Channel channel);

    /**
     *
     * @param channel
     * @return
     */
    List<Channel> findListV2(Channel channel);

    List<Channel> getList(Channel channel);


    /**
     * 查询组织架构点位列表
     * @param bo
     * @return
     */
    List<Channel> queryOrgChannels(ChannelOrgBo bo);

    List<Channel> queryTagChannels(ChannelTagBo bo);

    /**
     * 按区域统计点位数量
     *
     * @return
     */
    List<ChannelOrgCountDto> countByOrgQty();

    /**
     * 根据条件获取空值数据列表
     *
     * @param emptyCriteria  条件
     * @param filedList  字段
     * @return
     */
    List<Channel> filterEmptyList(@Param("emptyCriteria") String emptyCriteria, @Param("filedList") List<String> filedList, @Param("channelIds") List<Long> channelIds);

    /**
     * 根据条件过滤列表
     *
     * @param emptyCriteria
     * @param ruleList
     * @return
     */
    List<Channel> filterRuleList(@Param("emptyCriteria") String emptyCriteria, @Param("ruleList") List<ChannelGovernanceRuleCriteriaVo> ruleList, @Param("channelIds") List<Long> channelIds);

    /**
     * 过滤数据重复列表
     *
     * @param filedValue
     * @return
     */
    List<Channel> filterRepeatList(@Param("filedValue") String filedValue, @Param("channelIds") List<Long> channelIds);

    /**
     * 根据条件查询数据
     * @param searchChannelVo
     * @return
     */
    List<Channel> searchChannelList(SearchChannelVo searchChannelVo);

    /**
     * 获取多边形范围内的点位列表
     *
     * @param polygonWkt
     * @return
     */
    List<Channel> polygonChannel(@Param("polygonWkt") String polygonWkt);
}




